package com.etc.medical.client;

import com.etc.common.entity.BasicDoctor;
import com.etc.common.utils.Result;
import com.etc.medical.breaker.LoginAndRegisterBreak;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "sp-doctor", fallback = LoginAndRegisterBreak.class)
public interface LoginAndRegisterClient {
    /**
     * 登录
     */
    @RequestMapping(value = "/lr/login", method = RequestMethod.POST)
    Result login(@RequestParam("username") String username,@RequestParam("password") String password);


    /**
     * 注册
     */
    @RequestMapping(value = "/lr/register", method = RequestMethod.POST)
    Result register(BasicDoctor doctor);

    /**
     * 查询科室列表
     */
    @RequestMapping("/lr/queryDp")
    Result queryDepartmentList();

    /**
     * 查询职位列表
     */
    @RequestMapping("/lr/queryPs")
    Result queryPositionList();
}
